package kube

import (
	"fmt"
	"github.com/spf13/cobra"
)

func init() {
	registerSubCmd(addonCmd())
}

func addonCmd() *cobra.Command {
	supportSteps := "prepare,etcd,container,master,node,network"

	var cmd = &cobra.Command{
		Use:   "addon",
		Short: "添加插件",
		Long: `添加插件
安装dashboard、metrics-server、traefik等插件
`,
		Example: `
`,
		Args: func(cmd *cobra.Command, args []string) error {
			fmt.Println(supportSteps)
			return nil
		},
		RunE: func(cmd *cobra.Command, args []string) error {
			return newAnsiblePlaybookAndRun("07.cluster-addon.yml")
		},
	}

	return cmd
}
